<template>
  <div>
    <div>{{ pageName }}</div>
    <div>{{ name }}</div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  computed: {
    ...mapState(["name"])
  },
  asyncData(store) {
    console.log("asyncData执行");
    return store.dispatch("getName", { data: "jiangqiSSr" });
  },
  created() {
    this.$store.dispatch("getName", { data: "123" });
    window.that = this;
  }
};
</script>

<style>
</style>